//
//  QYForgetPasswordViewController.m
//  CarPooling
//
//  Created by Dxc_iOS on 2018/5/17.
//  Copyright © 2018年 代星创. All rights reserved.
//

#import "QYForgetPasswordViewController.h"
#import "QYLoginTFView.h"
@interface QYForgetPasswordViewController ()

@property (nonatomic,strong) UIButton  *codeBtn;
@property (nonatomic,strong) UIButton  *loginBtn;

@property (nonatomic,strong) QYLoginTFView *userTFView;
@property (nonatomic,strong) QYLoginTFView *phoneTFCodeView;
@property (nonatomic,strong) QYLoginTFView *passwordTFView;
@property (nonatomic,strong) QYLoginTFView *passwordTFView2;
@end

@implementation QYForgetPasswordViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"forget password";
    [self seupForgetPasswordUI];
}
-(void)seupForgetPasswordUI{
//
    _userTFView = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, 150, HDScreenWidth, 40)];
    [self.view addSubview:_userTFView];
    _userTFView.secureTextBtnIsHidden = YES;
    _userTFView.icon.image = IMAGE(@"login_name");
    _userTFView.textTF.placeholder = @"Please enter phone number or email";
    _userTFView.textTF.clearsOnBeginEditing = YES;
    _userTFView.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _userTFView.textTF.font =HDFont(14);
//
    _phoneTFCodeView = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_userTFView.frame)+50, HDScreenWidth, 40)];
    [self.view addSubview:_phoneTFCodeView];
    _phoneTFCodeView.secureTextBtnIsHidden = YES;
    _phoneTFCodeView.icon.image = IMAGE(@"");
    _phoneTFCodeView.textTF.placeholder = @"Please enter verification code";
    _phoneTFCodeView.textTF.clearsOnBeginEditing = YES;
    _phoneTFCodeView.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _phoneTFCodeView.textTF.font =HDFont(14);

//
    _codeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:_codeBtn];
    _codeBtn.sd_layout.rightSpaceToView(self.view, 30).topSpaceToView(_userTFView, 35).heightIs(40).widthIs(60);
    _codeBtn.backgroundColor = LoginBtnColor ;
    [_codeBtn setTitle:@"Log in" forState:UIControlStateNormal];
    [_codeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    _codeBtn.layer.cornerRadius = 6;
    [_codeBtn addTarget:self action:@selector(codeBtnClick) forControlEvents:UIControlEventTouchUpInside];
    
    
    _passwordTFView = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_phoneTFCodeView.frame)+50, HDScreenWidth, 40)];
    [self.view addSubview:_passwordTFView];
    _passwordTFView.secureTextBtnIsHidden = YES;
    _passwordTFView.icon.image = IMAGE(@"login_password");
    _passwordTFView.textTF.placeholder = @"Please enter new password";
    _passwordTFView.textTF.clearsOnBeginEditing = YES;
    _passwordTFView.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _passwordTFView.textTF.font =HDFont(14);

//
    _passwordTFView2 = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_passwordTFView.frame)+50, HDScreenWidth, 40)];
    [self.view addSubview:_passwordTFView2];
    _passwordTFView2.secureTextBtnIsHidden = YES;
    _passwordTFView2.icon.image = IMAGE(@"");
    _passwordTFView2.textTF.placeholder = @"enter new password again";
    _passwordTFView2.textTF.clearsOnBeginEditing = YES;
    _passwordTFView2.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _passwordTFView2.textTF.font =HDFont(14);
   
    
    //
    _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:_loginBtn];
    _loginBtn.sd_layout.leftSpaceToView(self.view, 30).rightSpaceToView(self.view, 30).topSpaceToView(_passwordTFView2, 80).heightIs(50);
    _loginBtn.backgroundColor = LoginBtnColor ;
    [_loginBtn setTitle:@"Log in" forState:UIControlStateNormal];
    [_loginBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    _loginBtn.layer.cornerRadius = 6;
    [_loginBtn addTarget:self action:@selector(loginBtnClick) forControlEvents:UIControlEventTouchUpInside];
    
}


#pragma mark - Btn ACtion

-(void)codeBtnClick{
    DDLogDebug(@"获取验证码");
}

-(void)loginBtnClick{
    DDLogDebug(@"登录");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
